home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / q_aparad.arc / TOOLKIT.QA < prev   
Text File  |  1991-03-13  |  9KB  |  265 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.               PARADOX COMMON QUESTIONS AND ANSWERS
  8.  
  9. DETOOL
  10.  
  11.    1.  Do you need to play TKMENU/SETUPDOWAIT for each image in a
  12.        multi-table form?
  13.  
  14.        Yes  and No.  You do need to  play  SETUPDOWAIT  for  each
  15.        image that will have user interaction under the control of
  16.        DOWAIT(" ") and a DPA Set.  SETUPDOWAIT creates a  DPA Set
  17.        for  a  given  image and form.  In multi-table forms, each
  18.        embedded form is a separate image, as a far as Paradox and
  19.        DOWAIT(" ") are concerned.
  20.  
  21.  
  22.    2.  When moving from image to  image in a DOWAIT(" ") session,
  23.        how is the DPA Set for a given image activated?
  24.  
  25.        First, it will be helpful to note that only  one  DPA  Set
  26.        can  be  active  in memory at any one time.  There are two
  27.        ways to activate a  particular  DPA Set.  One method is to
  28.        arrive in a table image through natural movement.  Natural
  29.        movement in  this context means movement via a key defined
  30.        as  a  regular  key.    Simply calling DOWAIT(" ") with  a
  31.        particular table image active would be natural movement to
  32.        that table image.  The second way to activate a DPA Set is
  33.        by calling  ARRIVETABLE()  within  your  own  code.   This
  34.        should be done  when  the  key  pressed by the user is not
  35.        "regular" but instead evokes  "special"  processing  via a
  36.        special key procedure or other procedure  such  as arrival
  37.        or  departure  procedures.   It is always safe to issue an
  38.        ARRIVETABLE() call.
  39.  
  40.  
  41.    3.  I played TKMENU/SETUPDOWAIT and thereby created a  DPA Set
  42.        script.  Is  that  enough to cause my procedure assignment
  43.        to be active when needed?
  44.  
  45.        No, the DPA Set  script  has within it code that defines a
  46.        procedure assignment  set.  The proc is named according to
  47.        a specific  convention  as  follows:    the  letters "TK",
  48.        followed by  the  table's  name,  and  then  an underscore
  49.        character "_", followed  finally  by the form number to be
  50.        used.  When no form is used, the  underscore  character is
  51.        followed by the word "None."  When either ARRIVETABLE() is
  52.        called by you (the programmer) or regular  movement brings
  53.        DOWAIT(" ") to a new  image,  DOWAIT("  ")  itself creates
  54.        on-the-fly a call to  a  proc  named  TKTableName_#.  If a
  55.        proc by the appropriate name is not in RAM (the script had
  56.        been played so as to load the proc into RAM), or  the proc
  57.        cannot be found within  the  AUTOLIB  path, a script error
  58.        will occur declaring that the necessary TKTableName_# proc
  59.        is not defined.
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.    4.  What are the common mistakes in  writing  an INITWAIT(...)
  74.        call?
  75.  
  76.        More description can be found  in  the  script DOW8DEMO.SC
  77.        found in your TOOLKIT directory.
  78.  
  79.        INITWAIT(...) takes three parameters.  The first parameter
  80.        denotes the  total number of workspace images that will be
  81.        present during the execution of DOWAIT(" ").  All embedded
  82.        forms in a multi-table  form  count.   Any other workspace
  83.        images count.  Table-Lookup  tables  do  not  count unless
  84.        they are also on  the  workspace.   Tables within SETPOPUP
  85.        (if used) do not count unless left on the workspace.
  86.  
  87.        The  second  INITWAIT(...)  parameter  denotes  the  image
  88.        numbers of the specific images  to  have  user interaction
  89.        performed on them under the control of DOWAIT("  ")  and a
  90.        DPA  Set.    A  WAIT  command  could  conceivably  control
  91.        processing  of  a  workspace  table  so  that  the  second
  92.        INITWAIT(...) parameter  need  not  be  informed  of  that
  93.        table's image number.
  94.  
  95.        NOTE:  Numbering  of  images within a multi-table form are
  96.        determined by chronological placement on the form,  not as
  97.        one might assume such as a clockwise, counterclockwise, or
  98.        other schema.
  99.  
  100.        The  third  INITWAIT(...)  parameter  spells out the table
  101.        names of DPA Set controlled images, and  should correspond
  102.        in order with parameter number 2  (above).   Misspellings,
  103.        spaces, or even the inclusion  of a path in this parameter
  104.        will cause a script error when DOWAIT(" ") tries to invoke
  105.        a DPA  Set.  The error message usually says "TKTableName_#
  106.        is not defined" and the culprit may be  within  this third
  107.        parameter of INITWAIT(...).
  108.  
  109.  
  110.    5.  Why do I have to press  <F2>  twice to end my edit session
  111.        when using DOWAIT(" ")?
  112.  
  113.        You don't!  Usually, <F2> is defined as an  EXIT  type  of
  114.        key  within your DPA Set script.  If  this  is  the  case,
  115.        pressing  <F2> will end, or EXIT  from,  the  DOWAIT("  ")
  116.        session.    The  "DO_IT!"  process  is  not  automatically
  117.        invoked.  Common processing would be as follows:
  118.  
  119.        ....
  120.        Dowait(" ")               ;F2 here would have been an EXIT
  121.                                          ;from dowait.
  122.        If retval="F2" then
  123.           DO_IT!
  124.        Endif
  125.        ....
  126.  
  127.  
  128.  
  129.  
  130.                               - 2 -
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.    6.  Are there any cautions in using DOWAIT(" ")?
  140.  
  141.        Only in  terms  of  your  computer's  memory  constraints.
  142.        Generally, you should be cautious about using  DOWAIT(" ")
  143.        if you have less than around 90K of MEMLEFT() once Paradox
  144.        has  been  loaded.    Efficient  PAL  programming  is also
  145.        important.
  146.  
  147.  
  148.    7.  What causes the message "TKTableName_#" not defined?
  149.  
  150.        A procedure by the name of the current workspace image and
  151.        form number is not in RAM memory, or is  not  found  along
  152.        the AUTOLIB  path.  A misspelling, or other naming problem
  153.        could   exist   within  the  third   parameter   of   your
  154.        INITWAIT(...) call.
  155.  
  156.  
  157.    8.  Why have I been getting the  run  error that a value xx is
  158.        not in the range of yy to zz, etc.?
  159.  
  160.        Usually, this is caused  by  trying  to reference an array
  161.        element that does not exist.  In the  context  of DOWAIT("
  162.        "), this could be due to invoking the wrong DPA Set.   Or,
  163.        you may have modified a form to be used within DOWAIT(" ")
  164.        and  since  then  have  not  redone the DPA Set script  by
  165.        replaying SETUPDOWAIT.
  166.  
  167.  
  168.    9.  What is a DPA Set?
  169.  
  170.        DPA Set  stands for DOWAIT Procedure Assignment Set.  This
  171.        is the set of Arrival, Departure, and  Special Procedures,
  172.        and also the  key  definition  you  have  declared through
  173.        playing TKMENU/SETUPDOWAIT.   This would be the equivalent
  174.        of   Paradox   version  2.0's   TOOLKIT/Field_Define   and
  175.        Key_Define scripts.
  176.  
  177.  
  178.   10.  How do I keep my current  image  on the Canvas when I want
  179.        to put up a message, or use an ACCEPT command?
  180.  
  181.        Issue  ECHO NORMAL    ECHO OFF  followed by your commands.
  182.        ECHO NORMAL writes  the  current  workspace  image  to the
  183.        Canvas.  ECHO OFF keeps the image on the Canvas so you may
  184.        write  to  it.    A  new procedure within the version  3.0
  185.        manual  is REFRESHCANVAS(), which performs similar a  duty
  186.        for use with the Runtime.
  187.  
  188.  
  189.   11.  TKACCEPT is  a  vital,  and  often  misunderstood  TOOLKIT
  190.        variable.  How and when is it used?
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                               - 3 -
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.        TKACCEPT  is  a  logical variable set to  either  True  or
  206.        False.  The value  of  TKACCEPT  determines whether or not
  207.        the key pressed by  the  user  (stored  in TKCHAR) will be
  208.        passed through to  Paradox.   For instance, a user presses
  209.        the  right-arrow  key.    You  (the  PAL  programmer) have
  210.        defined right-arrow as a  "special"  key,  so that for all
  211.        fields, except  the  form's  last  field,  regular  action
  212.        should occur, but on the last field of a form you  will do
  213.        something special.  For regular  action  to  occur (right-
  214.        arrow movement), make sure TKACCEPT=True.  In other words,
  215.        Accept the user keystroke  by  letting  Paradox do what it
  216.        would  normally  do.   However, when on  the  form's  last
  217.        field, assign  TKACCEPT  to  False  assuring  that  normal
  218.        right-arrow  action will not occur following your  special
  219.        action.  The default value of TKACCEPT is True.
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.                               - 4 -
  263.  
  264.  
  265.